/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ac.pbp.dto;

import ac.pbp.dto.filter.BukuFilterCriteria;
import ac.pbp.model.Buku;
import java.util.List;
import org.apache.catalina.util.Base64;

/**
 *
 * @author Kim
 */
public class BukuDto {
    
    private String kodeBuku;
    private String namaBuku;
    private String descBuku;
    private String kodePengarang;
    private String kodeGenre;
    private byte[] gambarCover;
    private String imageString;
    private String mode;
    private List<Buku> bukuList;
    private BukuFilterCriteria filterCriteria;

    public String getMode() {
        return mode;
    }

    public void setMode(String mode) {
        this.mode = mode;
    }

    public List<Buku> getBukuList() {
        return bukuList;
    }

    public void setBukuList(List<Buku> bukuList) {
        this.bukuList = bukuList;
    }

    public BukuFilterCriteria getFilterCriteria() {
        return filterCriteria;
    }

    public void setFilterCriteria(BukuFilterCriteria filterCriteria) {
        this.filterCriteria = filterCriteria;
    }

    public String getKodeBuku() {
        return kodeBuku;
    }

    public void setKodeBuku(String kodeBuku) {
        this.kodeBuku = kodeBuku;
    }

    public String getNamaBuku() {
        return namaBuku;
    }

    public void setNamaBuku(String namaBuku) {
        this.namaBuku = namaBuku;
    }

    public String getDescBuku() {
        return descBuku;
    }

    public void setDescBuku(String descBuku) {
        this.descBuku = descBuku;
    }

    public String getKodePengarang() {
        return kodePengarang;
    }

    public void setKodePengarang(String kodePengarang) {
        this.kodePengarang = kodePengarang;
    }

    public String getKodeGenre() {
        return kodeGenre;
    }

    public void setKodeGenre(String kodeGenre) {
        this.kodeGenre = kodeGenre;
    }

    public byte[] getGambarCover() {
        return gambarCover;
    }

    public void setGambarCover(byte[] gambarCover) {
        this.gambarCover = gambarCover;
    }

    public String getImageString() {
        return Base64.encode(getGambarCover());
    }

    public void setImageString(String imageString) {
        this.imageString = imageString;
    }
    
}
